﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace StripeDemo.Models
{
    public class Cards
    {
        [Required(ErrorMessage = "Customer ID is required")]
        [StringLength(200, MinimumLength = 1)]
        public string CustomerId { get; set; }

        [Required(ErrorMessage = "Card number is required")]
        [StringLength(50, MinimumLength = 8, ErrorMessage = "* A valid card nunber is required.")]
        //[Phone(ErrorMessage = "Please enter a valid card number.")]
        public string CardNumber { get; set; }

        [Required(ErrorMessage = "Card is required")]
        [StringLength(20, MinimumLength = 1)]
        public string Card { get; set; }

        [Required(ErrorMessage = "CVC is required")]
        [StringLength(50, MinimumLength = 1)]
        public string CVC { get; set; }

        [Required(ErrorMessage = "ExpiresMonth is required")]
        [StringLength(2, MinimumLength = 1)]
        public string ExpiresMonth { get; set; }

        [Required(ErrorMessage = "ExpiresYear is required")]
        [StringLength(4, MinimumLength = 1)]
        public string ExpiresYear { get; set; }

        [Required(ErrorMessage = "BillingAddress is required")]
        [StringLength(4, MinimumLength = 1)]
        public string BillingAddress { get; set; }

        [Required(ErrorMessage = "Default or not is required")]
        [StringLength(4, MinimumLength = 1)]
        public string isDefault { get; set; }

        [Required(ErrorMessage = "ReceiptEmail is required")]
        [Display(Name = "ReceiptEmail address")]
        [EmailAddress(ErrorMessage = "Invalid Email Address")]
        public string ReceiptEmail { get; set; }

        public string CardId { get; set; }
    }
}